<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
		<link rel="stylesheet" href="../css/iconfont.css" />
		<style>
			.mui-action-back {
				color: #fff;
			}
			
			.mui-bar .mui-btn-link {
				color: #fff;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">专属客服</h1>
		</header>
		<div class="mui-content">
			<ul class="mui-table-view">
				<!--<li class="mui-table-view-cell">
					<a class="mui-navigate-right">
						<span class="iconfont icon-kefuxiaomei"> </span> 退出登录
					</a>
				</li>-->

			</ul>
		</div>
		<script src="../lib/mui.min.js"></script>
		<script type="text/javascript" src="../lib/jquery-1.11.0.js"></script>
		<script type="text/javascript" src="../lib/service.js" ></script>
		<script type="text/javascript">
			mui.init()
			mui.plusReady(function(){
				plus.navigator.setStatusBarBackground("#FF7234");
				init()
			})
			function init(){
				getServer('app/servicesOnLine', "", function(res) {
					console.log(JSON.stringify(res))
						$('.mui-table-view').html(editList(res.data.servicePersons))
				});
			}
			function editList(data){
				var str ="";
				for(var i=0;i<data.length;i++){
					str +='<li class="mui-table-view-cell" id="'+data[i].id+'">'	
					str +='<a class="mui-navigate-right">'	
					str +='<span class="iconfont icon-kefuxiaomei"> </span> '+data[i].name		
					str +='</a></li>'	
				}
				console.log(str)
				return str;
			}
			$('.mui-table-view').on('tap','li',function(){
				console.log($(this).attr('id'))
				openurl('../auth/customer.html',JSON.stringify({
					id:$(this).attr('id')
				}))
			})
		</script>
	</body>

</html>